import request from '@/utils/request.js'

//查询登录者是否为服务队队长
export function trueMyTeam() {
	return request({
		'url': '/myCreate/team',
		headers: {
			isToken: true
		},
		'method': 'get',
		timeout: 20000
	})
}

//查询我(队长)创建的所有活动
export function allTeam() {
	return request({
		'url': '/myCreate/team/list',
		headers: {
			isToken: true
		},
		'method': 'get',
		timeout: 20000
	})
}


//队长创建活动
export function add(data) {
	return request({
		'url': '/myCreate/team',
		header: {
			'content-type' : "application/x-www-form-urlencoded"
		}, 
		'method': 'post',
		'data': data
	})
}

//非队长申请队伍
export function addApply(data) {
	return request({
		'url': '/myCreate/team/apply',
		header: {
			'content-type' : "application/x-www-form-urlencoded"
		}, 
		'method': 'post',
		'data': data
	})
}

//查询我的名字
export function myName() {
	return request({
		'url': '/system/user/my',
		headers: {
			isToken: true
		},
		'method': 'get',
		timeout: 20000
	})
}

